{extend name="layout/iframe" /}

{block name="content"}
<div class="x-body">
    <form class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>广告位名称
            </label>
            <div class="layui-input-inline">
                <input type="text" name="advertiseLocalName" required="" lay-verify="advertiseLocalName" autocomplete="off" value="{$info.advertiseLocalName}" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>广告位占位图
            </label>
            <div class="layui-upload">
                <button type="button" class="layui-btn" id="typeImg">
                    <i class="layui-icon">&#xe67c;</i>上传图片
                </button>
                <span style="margin-left: 20px;color: #9e9e9e;">图片大小：不超过200K</span>
                <div class="layui-upload-list" style="margin-left: 20%;">
                    <img class="layui-upload-img" src="{$info.topimgurl}" style="width: 100px;" id="test-upload-normal-img">
                    <p id="test-upload-demoText"></p>
                </div>
            </div>
            <input type="hidden" id="imgUrlvalue" value="{$info.topimgurl}" name="topimgurl" lay-verify="imgUrl" />
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                类型
            </label>
            <div class="layui-input-block">
                <input type="radio" name="type" value="0" title="首页轮播广告" {if condition="($info['type'] == 0)"}checked{/if}>
                <div class="layui-unselect layui-form-radio">
                    <i class="layui-anim layui-icon"></i><div>首页轮播广告</div>
                </div>

                <input type="radio" name="type" value="1" title="首页橱窗广告" {if condition="($info['type'] == 1)"}checked{/if}>
                <div class="layui-unselect layui-form-radio layui-form-radioed">
                    <i class="layui-anim layui-icon layui-anim-scaleSpring"></i><div>首页橱窗广告</div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>广告位收费（元/天）
            </label>
            <div class="layui-input-inline">
                <input type="text" name="advertiseForCharge" required="" lay-verify="advertiseForCharge" autocomplete="off" class="layui-input" value="{$info.advertiseForCharge/100}">
            </div>
        </div>

        <input type="hidden" name="id" value="{$info.id}">
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button class="layui-btn" lay-filter="add" lay-submit="">
                保存
            </button>
        </div>
    </form>
</div>

<script>
    var save_url = "{:url('admin/advertiselocal/savePost')}";
</script>
<script src="__STATIC__/admin/pages/js/advertiselocal.js" type="text/javascript"></script>
{/block}